<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>35.12. nis — Interface to Sun’s NIS (Yellow Pages) &mdash; Python 3.4.3 documentation</title>
    
    <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.4.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 3.4.3 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python 3.4.3 documentation" href="../index.html" />
    <link rel="up" title="35. Unix Specific Services" href="unix.html" />
    <link rel="next" title="35.13. syslog — Unix syslog library routines" href="syslog.html" />
    <link rel="prev" title="35.11. resource — Resource usage information" href="resource.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    <script type="text/javascript" src="../_static/version_switch.js"></script>
    
 

  </head>
  <body>  
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="syslog.html" title="35.13. syslog — Unix syslog library routines"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="resource.html" title="35.11. resource — Resource usage information"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
        <li>
          <span class="version_switcher_placeholder">3.4.3</span>
          <a href="../index.html">Documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="unix.html" accesskey="U">35. Unix Specific Services</a> &raquo;</li> 
      </ul>
    </div>    

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-nis">
<span id="nis-interface-to-sun-s-nis-yellow-pages"></span><h1>35.12. <a class="reference internal" href="#module-nis" title="nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">nis</span></tt></a> &#8212; Interface to Sun&#8217;s NIS (Yellow Pages)<a class="headerlink" href="#module-nis" title="Permalink to this headline">¶</a></h1>
<p>The <a class="reference internal" href="#module-nis" title="nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">nis</span></tt></a> module gives a thin wrapper around the NIS library, useful for
central administration of several hosts.</p>
<p>Because NIS exists only on Unix systems, this module is only available for Unix.</p>
<p>The <a class="reference internal" href="#module-nis" title="nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">nis</span></tt></a> module defines the following functions:</p>
<dl class="function">
<dt id="nis.match">
<tt class="descclassname">nis.</tt><tt class="descname">match</tt><big>(</big><em>key</em>, <em>mapname</em>, <em>domain=default_domain</em><big>)</big><a class="headerlink" href="#nis.match" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the match for <em>key</em> in map <em>mapname</em>, or raise an error
(<a class="reference internal" href="#nis.error" title="nis.error"><tt class="xref py py-exc docutils literal"><span class="pre">nis.error</span></tt></a>) if there is none. Both should be strings, <em>key</em> is 8-bit
clean. Return value is an arbitrary array of bytes (may contain <tt class="docutils literal"><span class="pre">NULL</span></tt> and
other joys).</p>
<p>Note that <em>mapname</em> is first checked if it is an alias to another name.</p>
<p>The <em>domain</em> argument allows to override the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.</p>
</dd></dl>

<dl class="function">
<dt id="nis.cat">
<tt class="descclassname">nis.</tt><tt class="descname">cat</tt><big>(</big><em>mapname</em>, <em>domain=default_domain</em><big>)</big><a class="headerlink" href="#nis.cat" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a dictionary mapping <em>key</em> to <em>value</em> such that <tt class="docutils literal"><span class="pre">match(key,</span>
<span class="pre">mapname)==value</span></tt>. Note that both keys and values of the dictionary are
arbitrary arrays of bytes.</p>
<p>Note that <em>mapname</em> is first checked if it is an alias to another name.</p>
<p>The <em>domain</em> argument allows to override the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.</p>
</dd></dl>

<dl class="function">
<dt id="nis.maps">
<tt class="descclassname">nis.</tt><tt class="descname">maps</tt><big>(</big><em>domain=default_domain</em><big>)</big><a class="headerlink" href="#nis.maps" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a list of all valid maps.</p>
<p>The <em>domain</em> argument allows to override the NIS domain used for the lookup. If
unspecified, lookup is in the default NIS domain.</p>
</dd></dl>

<dl class="function">
<dt id="nis.get_default_domain">
<tt class="descclassname">nis.</tt><tt class="descname">get_default_domain</tt><big>(</big><big>)</big><a class="headerlink" href="#nis.get_default_domain" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the system default NIS domain.</p>
</dd></dl>

<p>The <a class="reference internal" href="#module-nis" title="nis: Interface to Sun's NIS (Yellow Pages) library. (Unix)"><tt class="xref py py-mod docutils literal"><span class="pre">nis</span></tt></a> module defines the following exception:</p>
<dl class="exception">
<dt id="nis.error">
<em class="property">exception </em><tt class="descclassname">nis.</tt><tt class="descname">error</tt><a class="headerlink" href="#nis.error" title="Permalink to this definition">¶</a></dt>
<dd><p>An error raised when a NIS function returns an error code.</p>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="resource.html"
                        title="previous chapter">35.11. <tt class="docutils literal"><span class="pre">resource</span></tt> &#8212; Resource usage information</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="syslog.html"
                        title="next chapter">35.13. <tt class="docutils literal"><span class="pre">syslog</span></tt> &#8212; Unix syslog library routines</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
  <li><a href="../bugs.html">Report a Bug</a></li>
  <li><a href="../_sources/library/nis.txt"
         rel="nofollow">Show Source</a></li>
</ul>

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>  
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="syslog.html" title="35.13. syslog — Unix syslog library routines"
             >next</a> |</li>
        <li class="right" >
          <a href="resource.html" title="35.11. resource — Resource usage information"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="https://www.python.org/">Python</a> &raquo;</li>
        <li>
          <span class="version_switcher_placeholder">3.4.3</span>
          <a href="../index.html">Documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="unix.html" >35. Unix Specific Services</a> &raquo;</li> 
      </ul>
    </div>  
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2015, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="https://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Feb 26, 2015.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.3.
    </div>

  </body>
</html>